<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
    <div id="gallery">
    <?php include_once("connect.php"); ?>
	<?php
		$mysqli = connect();
        $query = "SELECT ProductID, ProductName, ProductDescription, Picture FROM products";
        
        if ($result = $mysqli->query($query)) {
        
            /* fetch object array */
            while ($row = $result->fetch_row()) {
				echo ' <div class="gallery_box"> <div class="gb_left"><a href="images/';
				echo "$row[3].jpg";
				echo '" class="pirobox" title="Project 1">
					   <img src="images/';
				echo  "$row[3].jpg";	   
				echo '" alt="" /></a></div><div class="gb_right"><h5> '; 
				echo "$row[1]"; 
				echo '</h5><p>'; 
				echo "$row[2]";
				echo '</p><div class="boton1"><a href="#">Cotizar</a></div></div><div class="cleaner"></div></div> ';
            }
        
            /* free result set */
            $result->close();
        }
        
        /* close connection */
        $mysqli->close();
        ?>     
    </div>
</body>
</html>